package com.cn.pack.feign;

import com.cn.pack.Student;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * name                 指要调用服务的名称
 * url                  调用地址
 *
 * @RequestMapping     调用路径，在这里此注解不能使用在类上
 */
@FeignClient(name = "spring-feign-controller", url = "http://localhost:8081")
public interface HelloFeignService {

    //@RequestMapping(path = "/hello/query", method = RequestMethod.POST)
    @RequestMapping(path = "/hello/query", method = RequestMethod.GET)
    Student query(Student student);
}
